package top.v5it.japi.plus.data.jpa.repository.support;

import org.springframework.data.jpa.repository.support.JpaRepositoryFactory;
import org.springframework.data.repository.core.RepositoryMetadata;

import javax.persistence.EntityManager;

/**
 * 注入自定义RepositoryBaseClass
 *
 * @author zhanpu
 * @date 2021/3/24
 */
public class JapiJpaRepositoryFactory extends JpaRepositoryFactory {

    public JapiJpaRepositoryFactory(EntityManager entityManager) {
        super(entityManager);
    }

    @Override
    protected Class<?> getRepositoryBaseClass(RepositoryMetadata metadata) {
        return JapiSimpleJpaRepository.class;
    }
}
